namespace Ds.DataBase.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class AddKaoHeFanWeiRenYuan : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.KaoHeFanWei_RenYuan",
                c => new
                    {
                        khfwryid = c.Int(nullable: false, identity: true),
                        username = c.String(),
                        NeiRong_nrid = c.Int(),
                    })
                .PrimaryKey(t => t.khfwryid)
                .ForeignKey("dbo.NeiRongs", t => t.NeiRong_nrid)
                .Index(t => t.NeiRong_nrid);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.KaoHeFanWei_RenYuan", "NeiRong_nrid", "dbo.NeiRongs");
            DropIndex("dbo.KaoHeFanWei_RenYuan", new[] { "NeiRong_nrid" });
            DropTable("dbo.KaoHeFanWei_RenYuan");
        }
    }
}
